import request from '@/utils/request'

// 查询大棚监测列表
export function listGhMonitor(query) {
  return request({
    url: '/system/ghMonitor/list',
    method: 'get',
    params: query
  })
}

// 查询大棚监测详细
export function getGhMonitor(id) {
  return request({
    url: '/system/ghMonitor/' + id,
    method: 'get'
  })
}

// 新增大棚监测
export function addGhMonitor(data) {
  return request({
    url: '/system/ghMonitor',
    method: 'post',
    data: data
  })
}

// 修改大棚监测
export function updateGhMonitor(data) {
  return request({
    url: '/system/ghMonitor',
    method: 'put',
    data: data
  })
}

// 删除大棚监测
export function delGhMonitor(id) {
  return request({
    url: '/system/ghMonitor/' + id,
    method: 'delete'
  })
}

// 导出大棚监测
export function exportGhMonitor(query) {
  return request({
    url: '/system/ghMonitor/export',
    method: 'get',
    params: query
  })
}

//获取过去24小时环境监测报表
export function report4Hour(query) {
  return request({
    url: '/system/ghMonitor/report/hour',
    method: 'get',
    params: query
  })
}